<?php

/*
 * Edit by shengxin
 * Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
 */

namespace api\v1\controller;

use api\base\CRestBase;
use cmf\lib\Upload;
/**
 * Description of FileInfoController
 *
 * @author PC
 */
class FileInfosController extends CRestBase{
    public function uploadZip(){
        session('user.id',1);
        $upload = new Upload();
        $upload->setFileType('file');
//        $upload->setUploadDir('tmp');
        $rs = $upload->upload();
        session('user.id',0);
        if($rs){
            return $this->success('ok',$rs);
        }else{
            return $this->error($upload->getError());
        }
    }
}
